"program-name", "GTK+ Code Demos",
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
PACKAGE_VERSION,
- gtk_major_version (),
- gtk_minor_version (),
- gtk_micro_version ()),
+ gtk_get_major_version (),
+ gtk_get_minor_version (),
+ gtk_get_micro_version ()),
"copyright", "(C) 1997-2009 The GTK+ Team",
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
#endif /* G_ENABLE_DEBUG */
/**
- * gtk_major_version:
+ * gtk_get_major_version:
*
* Returns the major version number of the GTK+ library. (e.g. in GTK+ version
* 3.1.5 this is 3.)
* macro, which represents the major version of the GTK+ headers you
* have included when compiling your code.
*
- * Returns the major version number of the GTK+ library.
+ * Returns: the major version number of the GTK+ library.
+ *
+ * Since: 3.0
*/
guint
-gtk_major_version (void)
+gtk_get_major_version (void)
{
return GTK_MAJOR_VERSION;
}
/**
- * gtk_minor_version:
+ * gtk_get_minor_version:
*
* Returns the minor version number of the GTK+ library. (e.g. in GTK+ version
* 3.1.5 this is 1.)
* #GTK_MINOR_VERSION macro, which represents the minor version of the
* GTK+ headers you have included when compiling your code.
*
- * Returns the minor version number of the GTK+ library.
+ * Returns: the minor version number of the GTK+ library.
+ *
+ * Since: 3.0
*/
guint
-gtk_minor_version (void)
+gtk_get_minor_version (void)
{
return GTK_MINOR_VERSION;
}
/**
- * gtk_micro_version:
+ * gtk_get_micro_version:
*
* Returns the micro version number of the GTK+ library. (e.g. in GTK+ version
* 3.1.5 this is 5.)
* #GTK_MICRO_VERSION macro, which represents the micro version of the
* GTK+ headers you have included when compiling your code.
*
- * Returns the micro version number of the GTK+ library.
+ * Returns: the micro version number of the GTK+ library.
+ *
+ * Since: 3.0
*/
guint
-gtk_micro_version (void)
+gtk_get_micro_version (void)
{
return GTK_MICRO_VERSION;
}
/**
- * gtk_binary_age:
+ * gtk_get_binary_age:
*
* Returns the binary age as passed to
* <application>libtool</application> when building the GTK+ library
* <application>libtool</application> means nothing to you, don't
* worry about it.
*
- * Returns the binary age of the GTK+ library.
+ * Returns: the binary age of the GTK+ library.
+ *
+ * Since: 3.0
*/
guint
-gtk_binary_age (void)
+gtk_get_binary_age (void)
{
return GTK_BINARY_AGE;
}
/**
- * gtk_interface_age:
+ * gtk_get_interface_age:
*
* Returns the interface age as passed to
* <application>libtool</application> when building the GTK+ library
* <application>libtool</application> means nothing to you, don't
* worry about it.
*
- * Returns the interface age of the GTK+ library.
+ * Returns: the interface age of the GTK+ library.
+ *
+ * Since: 3.0
*/
guint
-gtk_interface_age (void)
+gtk_get_interface_age (void)
{
return GTK_INTERFACE_AGE;
}
/* Gtk version.
*/
-guint gtk_major_version (void) G_GNUC_CONST;
-guint gtk_minor_version (void) G_GNUC_CONST;
-guint gtk_micro_version (void) G_GNUC_CONST;
-guint gtk_binary_age (void) G_GNUC_CONST;
-guint gtk_interface_age (void) G_GNUC_CONST;
+guint gtk_get_major_version (void) G_GNUC_CONST;
+guint gtk_get_minor_version (void) G_GNUC_CONST;
+guint gtk_get_micro_version (void) G_GNUC_CONST;
+guint gtk_get_binary_age (void) G_GNUC_CONST;
+guint gtk_get_interface_age (void) G_GNUC_CONST;
+
+#define gtk_major_version gtk_get_major_version ()
+#define gtk_minor_version gtk_get_minor_version ()
+#define gtk_micro_version gtk_get_micro_version ()
+#define gtk_binary_age gtk_get_binary_age ()
+#define gtk_interface_age gtk_get_interface_age ()
const gchar* gtk_check_version (guint required_major,
guint required_minor,
if (gtk_micro_version > 0)
sprintf (buffer,
"Gtk+ v%d.%d.%d",
- gtk_major_version (),
- gtk_minor_version (),
- gtk_micro_version ());
+ gtk_get_major_version (),
+ gtk_get_minor_version (),
+ gtk_get_micro_version ());
else
sprintf (buffer,
"Gtk+ v%d.%d",
- gtk_major_version (),
- gtk_minor_version ());
+ gtk_get_major_version (),
+ gtk_get_minor_version ());
label = gtk_label_new (buffer);
gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 0);